class Object
  def add_method(name, &block)
    (class << self; self; end).class_eval do
      define_method(name.to_sym) { |*args| block.call(*args) }
    end
  end
end

class Cat; end
c = Cat.new

c.add_method(:feed) do |food, quantity|
  puts "I eatz teh #{quantity}s #{food}"
end

c.feed("kibbles", 12)
c.feed("chicken", 1)

c2 = Cat.new
puts "c2 does not have the #feed method" unless c2.respond_to? :feed

# I eatz teh 12s kibbles
# I eatz teh 1s chicken
# c2 does not have the #feed method